package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @Author:FangZhiyi
 * @Description
 * @Data Created in 2020/7/30 16:12
 * @Moddified By:
 */
@Entity
@Table(name = "follow_up_operation_log", schema = "", catalog = "")
public class FollowUpOperationLog {
    private Long operationLogId;
    private String operatorId;
    private String operatorName;
    private Long operationRouteId;
    private Byte operationType;
    private String operationContent;
    private String operationDetail;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date operationTime;

    @Id
    @Column(name = "operation_log_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getOperationLogId() {
        return operationLogId;
    }

    public void setOperationLogId(Long operationLogId) {
        this.operationLogId = operationLogId;
    }

    @Basic
    @Column(name = "operator_id")
    public String getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    @Basic
    @Column(name = "operator_name")
    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    @Basic
    @Column(name = "operation_route_id")
    public Long getOperationRouteId() {
        return operationRouteId;
    }

    public void setOperationRouteId(Long operationRouteId) {
        this.operationRouteId = operationRouteId;
    }

    @Basic
    @Column(name = "operation_type")
    public Byte getOperationType() {
        return operationType;
    }

    public void setOperationType(Byte operationType) {
        this.operationType = operationType;
    }

    @Basic
    @Column(name = "operation_content")
    public String getOperationContent() {
        return operationContent;
    }

    public void setOperationContent(String operationContent) {
        this.operationContent = operationContent;
    }

    @Basic
    @Column(name = "operation_detail")
    public String getOperationDetail() {
        return operationDetail;
    }

    public void setOperationDetail(String operationDetail) {
        this.operationDetail = operationDetail;
    }

    @Basic
    @Column(name = "operation_time")
    public Date getOperationTime() {
        return operationTime;
    }

    public void setOperationTime(Date operationTime) {
        this.operationTime = operationTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FollowUpOperationLog that = (FollowUpOperationLog) o;
        return Objects.equals(operationLogId, that.operationLogId) &&
                Objects.equals(operatorId, that.operatorId) &&
                Objects.equals(operatorName, that.operatorName) &&
                Objects.equals(operationRouteId, that.operationRouteId) &&
                Objects.equals(operationType, that.operationType) &&
                Objects.equals(operationContent, that.operationContent) &&
                Objects.equals(operationDetail, that.operationDetail) &&
                Objects.equals(operationTime, that.operationTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(operationLogId, operatorId, operatorName, operationRouteId, operationType, operationContent, operationDetail, operationTime);
    }
}
